<?php

namespace app\common\command\queue;

use app\common\library\queue\Queue;
use think\console\Command;
use think\console\Input;
use think\console\Output;

class Work extends Command
{
    protected function configure()
    {
        $this->setName('queue:work')
            ->setDescription('Start processing jobs on the queue as a daemon');
    }

    protected function execute(Input $input, Output $output)
    {
        exit(Queue::consume());
    }
}
